package com.example.lib_base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface KeyDao {
    //新增  查询   删除  批量删除
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(keyEntity: KeyEntity)

    @Query("select * from keyEntity")
    fun query():MutableList<KeyEntity>

    @Delete
    fun delete(keyEntity: KeyEntity)

    @Query("delete from keyEntity")
    fun deleteAll()
}